/**
 * Created with IntelliJ IDEA.
 * Description: String重写了父类object中的equals方法 “==”基值引址
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-06-02  16:04
 */
public class Test1 {
    public static void main(String[] args) {
        String str = new String("hello");
        String str1 = new String("hello");
        String str2 = new String("Hello");

        System.out.println(str == str1);
        System.out.println(str1 == str2);
        System.out.println(str == str2);

        System.out.println("================");

        System.out.println(str.equals(str1));
        System.out.println(str1.equals(str2));
        System.out.println(str.equals(str2));
    }
}
